home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 7 / Amiga Format AFCD07 (Dec 1996, Issue 91).iso / serious / shareware / programming / aros / intuition / setwindowtitles.c < prev    next >
C/C++ Source or Header  |  1996-09-12  |  2KB  |  92 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: setwindowtitles.c,v 1.2 1996/08/29 13:57:38 digulla Exp $
  4.     $Log: setwindowtitles.c,v $
  5.     Revision 1.2  1996/08/29 13:57:38  digulla
  6.     Commented
  7.     Moved common code from driver to Intuition
  8.  
  9.     Revision 1.1  1996/08/23 17:28:18  digulla
  10.     Several new functions; some still empty.
  11.  
  12.  
  13.     Desc:
  14.     Lang: english
  15. */
  16. #include "intuition_intern.h"
  17.  
  18. extern void intui_SetWindowTitles (struct Window *, UBYTE *, UBYTE *);
  19.  
  20. /*****************************************************************************
  21.  
  22.     NAME */
  23.     #include <clib/intuition_protos.h>
  24.  
  25.     __AROS_LH3(void, SetWindowTitles,
  26.  
  27. /*  SYNOPSIS */
  28.     __AROS_LHA(struct Window *, window, A0),
  29.     __AROS_LHA(UBYTE         *, windowTitle, A1),
  30.     __AROS_LHA(UBYTE         *, screenTitle, A2),
  31.  
  32. /*  LOCATION */
  33.     struct IntuitionBase *, IntuitionBase, 46, Intuition)
  34.  
  35. /*  FUNCTION
  36.     Changes the current window and/or the screen title.
  37.  
  38.     INPUTS
  39.     window - Change the title for this window or the screen which the
  40.         window contains.
  41.     windowTitle - New title for the window or ((UBYTE *)~0L) to keep the
  42.         old title or NULL for no title. If you specify a string,
  43.         this string is *NOT* copied.
  44.     screenTitle - New title for the screen of the window or ((UBYTE *)~0L)
  45.         to keep the old title or NULL for no title. If you specify
  46.         a title for the screen, this title will be shown when the
  47.         window becomes active. If you specify a string, this string
  48.         is *NOT* copied.
  49.  
  50.     RESULT
  51.     None.
  52.  
  53.     NOTES
  54.     You should be careful with specifying a screen title because that
  55.     may irritate the user.
  56.  
  57.     EXAMPLE
  58.  
  59.     BUGS
  60.  
  61.     SEE ALSO
  62.  
  63.     INTERNALS
  64.  
  65.     HISTORY
  66.     29-10-95    digulla automatically created from
  67.                 intuition_lib.fd and clib/intuition_protos.h
  68.  
  69. *****************************************************************************/
  70. {
  71.     __AROS_FUNC_INIT
  72.     __AROS_BASE_EXT_DECL(struct IntuitionBase *,IntuitionBase)
  73.  
  74.     /* Call driver before changing the window to allow it to examine
  75.     the old values. */
  76.     intui_SetWindowTitles (window, windowTitle, screenTitle);
  77.  
  78.     /* Change window's title */
  79.     if (!windowTitle)
  80.     window->Title = NULL;
  81.     else if (windowTitle != (UBYTE *)~0L)
  82.     window->Title = windowTitle;
  83.  
  84.     /* Change screen's title */
  85.     if (!screenTitle)
  86.     window->ScreenTitle = NULL;
  87.     else if (screenTitle != (UBYTE *)~0L)
  88.     window->ScreenTitle = screenTitle;
  89.  
  90.     __AROS_FUNC_EXIT
  91. } /* SetWindowTitles */
  92.